package com.ruicar.afs.cloud.auth.oauth2;

import com.ruicar.afs.cloud.common.core.util.HessianUtil;
import org.springframework.security.oauth2.provider.token.store.redis.JdkSerializationStrategy;

public class AfsTokenSerializationStrategy extends JdkSerializationStrategy {
    @Override
    protected <T> T deserializeInternal(byte[] bytes, Class<T> clazz) {
        return HessianUtil.deserializeNoCompress(bytes);
    }

    @Override
    protected byte[] serializeInternal(Object object) {
        return HessianUtil.serializationNoCompress(object);
    }
}
